# encoding: utf-8
"""
Serialization schemas for Zones resources RESTful API
----------------------------------------------------
"""

from flask_marshmallow import base_fields
from flask_restplus_patched import ModelSchema

from .models import Zone


class BaseZonesSchema(ModelSchema):
    """
    Base team schema exposes only the most general fields.
    """

    class Meta:
        # pylint: disable=missing-docstring
        model = Zone
        fields = (
            Zone.zone_code.key,
            Zone.parent_code.key,
            Zone.zone_title.key,
            Zone.zone_desc.key,
            Zone.available.key,
            Zone.build_in.key,
            Zone.home_path.key,
            Zone.zone_alias.key,
            Zone.timezone.key,
            Zone.order_no.key,
        )

        dump_only = (
            Zone.zone_code.key,
        )
